/**
 * @(#)com.framework.web.bus.domain.GoodsInfo
 *
 * Copyright (c) 2014-2018 隔壁老王有限公司
 *
 * DESC:
 *
 */
package com.framework.web.bus.domain;

import com.framework.core.domain.IdEntity;
import sun.awt.SunHints;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.util.Date;

/**
 * @author gblw
 * @version 1.0  2016/9/11
 */
@Entity
@javax.persistence.Table(name = "t_bus_goods_info")
public class GoodsInfo extends IdEntity implements java.io.Serializable {


    private String title;
    private String img;
    private Date postDate;
    private Date pullDate;
    private Integer isSale;
    private Integer isPost;
    private String postDesc;
    private Double price;
    private Double currentPrice;
    private Double discount;
    private String description;
    private Integer salesVolume;
    private Integer buyers;
    private Integer stock;
    private String validityDate;
    private String goodsTypeId;
    private Integer status;
    private String createBy;
    private String createName;
    private Date createTime;
    private String updateBy;
    private String updateName;
    private Date updateTime;

    private GoodsType goodsType;

    @Basic
    @javax.persistence.Column(name = "TITLE")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }


    @Basic
    @javax.persistence.Column(name = "IMG")
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }


    @Basic
    @javax.persistence.Column(name = "POST_DATE")
    public Date getPostDate() {
        return postDate;
    }

    public void setPostDate(Date postDate) {
        this.postDate = postDate;
    }


    @Basic
    @javax.persistence.Column(name = "PULL_DATE")
    public Date getPullDate() {
        return pullDate;
    }

    public void setPullDate(Date pullDate) {
        this.pullDate = pullDate;
    }

    @Basic
    @javax.persistence.Column(name = "IS_SALE")
    public Integer getIsSale() {
        return isSale;
    }

    public void setIsSale(Integer isSale) {
        this.isSale = isSale;
    }

    @Basic
    @javax.persistence.Column(name = "IS_POST")
    public Integer getIsPost() {
        return isPost;
    }

    public void setIsPost(Integer isPost) {
        this.isPost = isPost;
    }

     @Basic
    @javax.persistence.Column(name = "POST_DESC")
    public String getPostDesc() {
        return postDesc;
    }

    public void setPostDesc(String postDesc) {
        this.postDesc = postDesc;
    }
    @Basic
    @javax.persistence.Column(name = "BUYERS")
    public Integer getBuyers() {
        return buyers;
    }

    public void setBuyers(Integer buyers) {
        this.buyers = buyers;
    }

    @Basic
    @javax.persistence.Column(name = "PRICE")
    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }


    @Basic
    @javax.persistence.Column(name = "CURRENT_PRICE")
    public Double getCurrentPrice() {
        return currentPrice;
    }

    public void setCurrentPrice(Double currentPrice) {
        this.currentPrice = currentPrice;
    }


    @Basic
    @javax.persistence.Column(name = "DISCOUNT")
    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }


    @Basic
    @javax.persistence.Column(name = "DESCRIPTION")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }


    @Basic
    @javax.persistence.Column(name = "SALES_VOLUME")
    public Integer getSalesVolume() {
        return salesVolume;
    }

    public void setSalesVolume(Integer salesVolume) {
        this.salesVolume = salesVolume;
    }


    @Basic
    @javax.persistence.Column(name = "STOCK")
    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }


    @Basic
    @javax.persistence.Column(name = "VALIDITY_DATE")
    public String getValidityDate() {
        return validityDate;
    }

    public void setValidityDate(String validityDate) {
        this.validityDate = validityDate;
    }


    @Basic
    @javax.persistence.Column(name = "GOODS_TYPE_ID")
    public String getGoodsTypeId() {
        return goodsTypeId;
    }

    public void setGoodsTypeId(String goodsTypeId) {
        this.goodsTypeId = goodsTypeId;
    }


    @Basic
    @javax.persistence.Column(name = "STATUS")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    @Basic
    @javax.persistence.Column(name = "CREATE_BY")
    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }


    @Basic
    @javax.persistence.Column(name = "CREATE_NAME")
    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }


    @Basic
    @javax.persistence.Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    @Basic
    @javax.persistence.Column(name = "UPDATE_BY")
    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }


    @Basic
    @javax.persistence.Column(name = "UPDATE_NAME")
    public String getUpdateName() {
        return updateName;
    }

    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }


    @Basic
    @javax.persistence.Column(name = "UPDATE_TIME")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }



    @ManyToOne(targetEntity = GoodsType.class)
    @JoinColumn(name = "GOODS_TYPE_ID",insertable = false, updatable = false)
    public GoodsType getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(GoodsType goodsType) {
        this.goodsType = goodsType;
    }
}

